Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Integer partition #24

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 22, 2020
Merged

Integer partition #24

merged 4 commits into from
May 22, 2020

Conversation

Egraveline
Copy link

this is a fix to the issue #284 detailed here:
algorithm-visualizer/algorithm-visualizer#284

It also had errors with the matrix which have been fixed. The code more closely resembles the code referenced in the README.
https://github.com/trekhleb/javascript-algorithms/tree/master/src/algorithms/math/integer-partition

I tried to keep the code as similar to the original as possible.

here are some screenshots of the errors.
before:
before
after:
after

Eti added 4 commits May 22, 2020 18:46
returns the wrong total for some values of n
e.g. when n is 6 returns 14 instead of 11

This more closely resembles the code from referenced in the README:
https://github.com/trekhleb/javascript-algorithms/tree/master/src/algorithms/math/integer-partition
on some values it would print wrong partitions
e.g. when n is 6 [3,3,1] is printed but is not a valid output
@64json
Copy link
Member

64json commented May 22, 2020

Thanks for the fix!

@64json 64json merged commit 2881b3f into algorithm-visualizer:master May 22, 2020
@Egraveline Egraveline deleted the Integer-Partition branch May 22, 2020 23:09
Copy link

@gifTa4gupzawkikwaq gifTa4gupzawkikwaq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link

@gifTa4gupzawkikwaq gifTa4gupzawkikwaq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


Copy link

@gifTa4gupzawkikwaq gifTa4gupzawkikwaq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link

@gifTa4gupzawkikwaq gifTa4gupzawkikwaq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants